{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "name = \"Python\"\n",
    "age = 27\n",
    "\n",
    "# print string like \"I'am Python, and 27 years old.\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "print(\"I'am \" + name + \", and \" + str(age) +\" years old.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "print(\"I'am %s, and %d years old.\" % (name, age))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "age = '27'\n",
    "print(\"I'am %s, and %s years old.\" % (name, age))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "print(\"I'am {}, and {} years old.\".format(name, age))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "print(\"I'am {name}, and {age} years old.\".format(name=name, age=age))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "print(\"I'am {1}, and {0} years old.\".format(age, name))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "print(f\"I'am {name}, and {age} years old.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am Python, and [27] years old.\n"
     ]
    }
   ],
   "source": [
    "age = [27]\n",
    "print(f\"I'am {name}, and {age} years old.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "I'am python, and 27 years old.\n"
     ]
    }
   ],
   "source": [
    "class Test:\n",
    "    name = \"python\"\n",
    "    age = 27\n",
    "print(f\"I'am {Test.name}, and {Test.age} years old.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
